﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MiniBug.Entity.User>" %>
<%@ Import Namespace="Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Create
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="CustomScript" runat="server">
   
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Create</h2>
    <% using (Html.BeginForm())
       {%>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <legend>Fields</legend>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.Name) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.Name)%>
            <%: Html.ValidationMessageFor(model => model.Name) %>
            
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.Login) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.Login, new  {@onchange="CheckAvailability()" }) %>
            <%: Html.ValidationMessageFor(model => model.Login) %>
            <div style="display: inline;" id="usernamelookupresult">
           <img id="login-verification" src="../../Content/images/spinner.gif" alt=""/>
            </div>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.Password) %>
        </div>
        <div class="editor-field">
            <%: Html.PasswordFor(model => model.Password, new { @class="password"})%>
            <%: Html.ValidationMessageFor(model => model.Password) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.Email) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.Email) %>
            <%: Html.ValidationMessageFor(model => model.Email) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.isVirtual) %>
        </div>
        <div class="editor-field">
            <%: Html.CheckBoxFor(model => model.isVirtual) %>
            <%: Html.ValidationMessageFor(model => model.isVirtual) %>
        </div>
         <div class="editor-label">
            <%: Html.LabelFor(model => model.isAdmin) %>
        </div>
        <div class="editor-field">
            <%: Html.CheckBoxFor(model => model.isAdmin) %>
            <%: Html.ValidationMessageFor(model => model.isAdmin) %>
        </div>       
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
    <% } %>
    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>
</asp:Content>
